﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.Data {

    public class RedProductRecordDetailMap : EntityTypeConfiguration<RedProductRecordDetail> {
        public RedProductRecordDetailMap() {
            ToTable("mc_RedProductRecordDetail", "dbo");
            HasKey(t => t.Id);
            Property(t => t.Id)
                .HasColumnName("Id")
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
                .IsRequired();
            Property(t => t.MerchantId)
                .HasColumnName("MerchantId")
                .IsRequired();
            Property(t => t.HorsePower)
                .HasColumnName("HorsePower")
                .IsRequired();
            Property(t => t.RedDrill)
                .HasColumnName("RedDrill").HasPrecision(18, 6)
                .IsRequired();
            Property(t => t.Type)
                .HasColumnName("Type")
                .IsRequired();
            Property(t => t.IsReceive)
                .HasColumnName("IsReceive")
                .IsRequired();
            Property(t => t.ReceiveTime)
                .HasColumnName("ReceiveTime");
            Property(t => t.Remark)
                .HasColumnName("Remark");
            Property(t => t.CreateTime)
                .HasColumnName("CreateTime")
                .IsRequired();
            Property(t => t.RedRecordId)
                .HasColumnName("RedRecordId")
                .IsRequired();
            Property(t => t.RedProductionTime)
                .HasColumnName("RedProductionTime")
                .IsRequired();
            Property(p => p.RowVersion).IsRowVersion();
        }
    }
}
